<?php /* Smarty version 2.6.18, created on 2009-11-19 00:18:44
         compiled from reportFMASS_table.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'reportFMASS_table.tpl', 16, false),array('modifier', 'string_format', 'reportFMASS_table.tpl', 21, false),)), $this); ?>
<div class="boxed">
<table width="100%" class="grid">
	<tr bgcolor="#cccccc">
		<td><b>Overall<b></td>
	</tr>
	<tr bgcolor="#cccccc">
		<td><b>Month</b></td>
		<td><b>Total Number of Shipments</b></td>
		<td><b>Total Numbeer of Species Delivered</b></td>
		<td><b>Avg DOA%</b></td>
		<td><b>AVG Reject%</b></td>
		<td><b>Revenue (PGK)</b></td>
	</tr>
	
	<?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['month']):
?>
		<tr class="<?php echo smarty_function_cycle(array('values' => "blue,notify"), $this);?>
">
			<td><?php echo $this->_tpl_vars['month']; ?>
</td>
			<td><?php echo $this->_tpl_vars['results'][$this->_tpl_vars['month']]['sshipid']; ?>
</td>
			<td><?php echo $this->_tpl_vars['results'][$this->_tpl_vars['month']]['soid']; ?>
</td>
			<?php $this->assign('pdoa', $this->_tpl_vars['results'][$this->_tpl_vars['month']]['avg_doa']/$this->_tpl_vars['results'][$this->_tpl_vars['month']]['avg_received']); ?>
			<td><?php echo ((is_array($_tmp=$this->_tpl_vars['pdoa']*100)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%</td>
			<?php $this->assign('preject', $this->_tpl_vars['results'][$this->_tpl_vars['month']]['avg_reject']/$this->_tpl_vars['results'][$this->_tpl_vars['month']]['avg_received']); ?>
			<td><?php echo ((is_array($_tmp=$this->_tpl_vars['preject']*100)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%</td>
			<?php $this->assign('rev', $this->_tpl_vars['results'][$this->_tpl_vars['month']]['received_amount']-$this->_tpl_vars['results'][$this->_tpl_vars['month']]['total_amount']); ?>
			<td><?php echo $this->_tpl_vars['rev']; ?>
</td>
		</tr>
	<?php endforeach; endif; unset($_from); ?>
	
</table>
</div>
<br><br>
<?php if ($this->_tpl_vars['summary']): ?>
<div class="boxed">
<table width="100%">
	<tr bgcolor="#cccccc">
		<td><label><b>Number of Shipments<b></label></td>
	</tr>
	<tr bgcolor="#cccccc">
		<td></td>
		<?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['month']):
?>
		<td><label><b><?php echo $this->_tpl_vars['month']; ?>
</b></label></td>
		<?php endforeach; endif; unset($_from); ?>
		<td><label><b>Total</b></label></td>
	</tr>
	<?php $_from = $this->_tpl_vars['nshipments']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['fma']):
?>
		<tr class="<?php echo smarty_function_cycle(array('values' => "blue,notify"), $this);?>
">
			<td><label><?php echo $this->_tpl_vars['fma'][$this->_tpl_vars['month']]['trading_name']; ?>
</label></td>
			<?php $this->assign('tcnt', 0); ?>
			<?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['month']):
?>
				<td><label><?php echo $this->_tpl_vars['fma'][$this->_tpl_vars['month']]['cnt']; ?>
</label></td>
				<?php $this->assign('tcnt', $this->_tpl_vars['tcnt']+$this->_tpl_vars['fma'][$this->_tpl_vars['month']]['cnt']); ?>
			<?php endforeach; endif; unset($_from); ?>
			<td><?php echo $this->_tpl_vars['tcnt']; ?>
</td>
		</tr>
	<?php endforeach; endif; unset($_from); ?>
</table>
</div>
<?php endif; ?>
<br><br>
<?php if ($this->_tpl_vars['organism']): ?>
<div class="boxed">
<table width="100%">
	<tr bgcolor="#cccccc">
		<td><label><b>Number of Organisms Per Shipment<b></label></td>
	</tr>
	<tr bgcolor="#cccccc">
		<td></td>
		<?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['month']):
?>
		<td><label><b><?php echo $this->_tpl_vars['month']; ?>
</b></label></td>
		<?php endforeach; endif; unset($_from); ?>
		<td><label><b>Total</b></label></td>
	</tr>
	<?php $_from = $this->_tpl_vars['norganisms']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['fma']):
?>
		<tr class="<?php echo smarty_function_cycle(array('values' => "blue,notify"), $this);?>
">
			<td><label><?php echo $this->_tpl_vars['fma'][$this->_tpl_vars['month']]['trading_name']; ?>
</label></td>
			<?php $this->assign('tcnt', 0); ?>
			<?php $_from = $this->_tpl_vars['months']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['month']):
?>
				<td><label><?php echo $this->_tpl_vars['fma'][$this->_tpl_vars['month']]['cnt']; ?>
</label></td>
				<?php $this->assign('tcnt', $this->_tpl_vars['tcnt']+$this->_tpl_vars['fma'][$this->_tpl_vars['month']]['cnt']); ?>
			<?php endforeach; endif; unset($_from); ?>
			<td><?php echo $this->_tpl_vars['tcnt']; ?>
</td>
		</tr>
	<?php endforeach; endif; unset($_from); ?>
</table>
</div>
<?php endif; ?>
	
	
	